from django.db import models
from apps.sale.models import Customer
from apps.source.models import Supplier
# Create your models here.
class CustomerAcccount(models.Model):
    F001 = models.OneToOneField(Customer,on_delete=models.CASCADE,verbose_name='对应客户')
    B001 = models.CharField(max_length=30, null=True, blank=True,verbose_name='银行账号')
    B002 = models.CharField(max_length=30, null=True, blank=True,verbose_name='开户行')
    B003 = models.CharField(max_length=30, null=True, blank=True,verbose_name='税号')
    def __str__(self):
        return self.F001 + '付款信息'
    class Meta:
        verbose_name = '客户账款信息'
        verbose_name_plural = verbose_name


class SupplierAcccount(models.Model):
    F001 = models.OneToOneField(Supplier,on_delete=models.CASCADE,verbose_name='对应客户')
    B001 = models.CharField(max_length=30, null=True, blank=True,verbose_name='银行账号')
    B002 = models.CharField(max_length=30, null=True, blank=True,verbose_name='开户行')
    B003 = models.CharField(max_length=30, null=True, blank=True,verbose_name='税号')
    def __str__(self):
        return self.F001 + '付款信息'
    class Meta:
        verbose_name = '供应商账款信息'
        verbose_name_plural = verbose_name